<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <button disabled>阅读并同意注册协议(5)</button>
</body>
<script>
  const button = document.querySelector('button');
  console.log(button)
  //2.倒计时 
  let n = 5
  timer = setInterval(function () {
    if (n > 0) {
      n--;
      button.innerHTML = `阅读并同意注册协议(${n})`
      console.log(n)
    } else {
      //button.removeAttribute('disabled')
      button.disabled = false
      button.innerHTML = '阅读并同意注册协议'
      clearInterval(timer)
    }
  }, 1000)
</script>

</html>